home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_3
/
multiuser
/
src
/
library
/
task.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-07
|
3KB
|
77 lines
/************************************************************
* MultiUser - MultiUser Task/File Support System *
* --------------------------------------------------------- *
* Task Management Routines *
* --------------------------------------------------------- *
* © Copyright 1993-1994 Geert Uytterhoeven *
* All Rights Reserved. *
************************************************************/
#include "multiuser.h"
/*
* Private Task Level Node
*/
struct muTaskLevel {
struct MinNode Node;
struct MinList Tasks; /* List of Tasks in this Level */
struct MinList Children; /* List of Child Levels */
struct muTaskLevel *Parent;
struct muExtOwner Owner; /* This MUST be the last member!! */
};
/*
* Private Task Node
*/
struct muTaskNode {
struct MinNode LevelNode; /* In Level */
struct MinNode ListNode; /* In Task List */
struct Task *Task;
ULONG DefProtection; /* Default Protection Bits */
struct muTaskLevel *Level;
};
/*
* Extended Owner Information Structure for root
*/
extern struct muExtOwner RootExtOwner;
/*
* Function Prototypes
*/
extern void InitTaskList(void);
extern struct muTaskNode *CreateOrphanTask(struct Task *task, ULONG defprotection);
extern void RemAllTaskNodes(void);
extern BOOL PushTask(struct Task *task, struct muExtOwner *owner);
extern BOOL PushTaskLevel(struct Task *task, struct muExtOwner *owner);
extern BOOL PopTask(struct Task *task);
extern BOOL PopTaskLevel(struct Task *task);
extern BOOL PopTaskDetach(struct Task *task);
extern BOOL PopTaskLevelDetach(struct Task *task);
extern ULONG GetTaskOwner(struct Task *task);
extern struct muExtOwner *GetTaskExtOwner(struct Task *task);
extern ULONG GetTaskDefProtect(struct Task *task);
extern BOOL SetTaskDefProtect(struct Task *task, ULONG defprotection);
extern BOOL SetLevelDefProtect(struct Task *task, ULONG defprotection);
extern APTR __asm __saveds NEWAddTask(register __a1 struct Task *task, register __a2 APTR initpc,
register __a3 APTR finalpc,
register __a6 struct ExecBase *sysbase);
extern void __asm __saveds NEWRemTask(register __a1 struct Task *task,
register __a6 struct ExecBase *sysbase);
extern ULONG __asm __saveds muGetTaskOwner(register __d0 struct Task *task);
extern struct muExtOwner __asm __saveds *muGetTaskExtOwner(register __d0 struct Task *task);
extern void __asm __saveds muFreeExtOwner(register __a0 struct muExtOwner *owner);
extern BOOL __asm __saveds muKill(register __d0 struct Task *task);
extern BOOL __asm __saveds muFreeze(register __d0 struct Task *task);
extern BOOL __asm __saveds muUnfreeze(register __d0 struct Task *task);